#ifndef DOWNLOADMANAGERWIDGET_H
#define DOWNLOADMANAGERWIDGET_H

#include <QWidget>

namespace Ui {
class downloadManagerWidget;
}
class browserview;
class downloaditemcontroller;
class QWebEngineDownloadRequest;
class downloaditemwidget;

class downloadManagerWidget : public QWidget
{
    Q_OBJECT

public:
    explicit downloadManagerWidget(QWidget *parent = nullptr);
    ~downloadManagerWidget();

    QString downloadDir = "";
    void downloadRequested(QWebEngineDownloadRequest *webItem);
    browserview *view;
private:
    Ui::downloadManagerWidget *ui;
    void setShadowEffect(QWidget * w);

    QString setOrGetDownloadDir();
    void add(downloaditemwidget *downloadWidget, downloaditemcontroller *newcontroller);
    void remove(downloaditemcontroller *newcontroller);
    void loadHistory();

    int numberOfDownloads = 0 ;

private slots:
    void changeDownloadLocation();
    void lookupHistory();

};

#endif // DOWNLOADMANAGERWIDGET_H
